//
// Created by Tony on 2024/5/19.
//

#ifndef LEXER_BOOLEAN_TOKEN_H
#define LEXER_BOOLEAN_TOKEN_H

#include "../../common/KeyWords.h"
#include "Token.h"

namespace Lexer {

class BooleanToken final : public Token {
    bool value;

public:
    explicit BooleanToken(const Position& position, bool value) : Token(position), value(value) {}

    TokenType type() override { return TokenType::BOOLEAN_LITERAL; }

    bool getValue() const { return value; }

    string toString() override { return value ? KeyWords::TRUE : KeyWords::FALSE; };
};

} // namespace Lexer

#endif // LEXER_BOOLEAN_TOKEN_H
